﻿using UnityEngine;
using System.Collections;

public class button : MonoBehaviour
{

		public link link;
		private int a;

	public ButtonLine line;

		// Use this for initialization
		void Start ()
		{
		line = link.line;
		}
	
		// Update is called once per frame
		void Update ()
		{
	
		}

	void OnTriggerEnter (Collider col)
	{
		if (col.gameObject.tag == "Player") 
		{
			Debug.Log("button to go");
			Debug.DrawLine(transform.position,link.transform.position,Color.red,duration:20f);
			link.go();
		}
	}
}
